
#ifndef _INC_CE_PROCESS_INTERNAL_
#define _INC_CE_PROCESS_INTERNAL_


struct _tiddata {
  unsigned long _tid; 
  unsigned long _thandle;
  // per thread errno
  int _terrno;
  // currentdir is per thread, so you can write a multithreaded ftpd.
  // this differs from normal Win32, where currentdir is per process.
  unsigned short _tcurrent_dirw[256];
  unsigned short _tcurrent_root_dirw[256];
  // getopt
  char *_optarg;
  int _optind;
  int _opterr;
  int _optopt;
  int _optreset;
  // other stuff to be inserted (strerror, asctime, ...)
  void * _initaddr; 
  void * _initarg;
  void * _curwin; // for console
};

typedef struct _tiddata * _ptiddata;

_ptiddata _ptd_get(void); 

#endif // _INC_CE_PROCESS_INTERNAL_